# -*- coding:utf-8 -*-

import os


"""
+--------------------------------------------------------------------+
|                             客户端路径配置                            |
+--------------------------------------------------------------------+
"""

# 客户端根目录
BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
# 客户端目录
CLIENT_DIR = {
    "file_path": os.path.join(BASE_DIR, "data"),
    "log_path": os.path.join(BASE_DIR, "logs"),
    "temp_path": os.path.join(BASE_DIR, "data/temp")
}
# 客户端文件目录
FILE_DIR = {
    "log_file": os.path.join(CLIENT_DIR["log_path"], "client.log")
}

"""
+--------------------------------------------------------------------+
|                          客户端返回状态配置                           |
+--------------------------------------------------------------------+
"""

# 由服务端口发送状态码, 动态
STATUS_CODE = {}

# 文件下载信息保存文件名(无后缀),动态
TEMP_INFO = ""

# 临时下载文件后缀名，动态
TEMP_NAME = ""

"""
+--------------------------------------------------------------------+
|                             服务端参数配置                            |
+--------------------------------------------------------------------+
"""

# 传输默认编码类型
CS_CODING = "utf-8"
# 账户默认加密编码类型
MD5_CODING = "utf-8"

# 最大客户端链接监听数
REQUEST_QUEUE_SIZE = 5
# 最大传输收取大小
MAX_PACKET_SIZE = 8192
# 服务器IP
HOST = "127.0.0.1"
# 端口号
PORT = 9088
